#!/usr/bin/python3
# -*- coding:utf-8 -*-
# Copyright 2022-2023 Huawei Technologies Co., Ltd
import torch
import numpy as np
torch.manual_seed(0)  

def gen_golden_data_simple():
    input_s = torch.rand(17,dtype = torch.float)*20 - 10
    input_e = torch.rand(17,dtype = torch.float)*20 - 10
    input_w = torch.rand(17,dtype = torch.float)*2 - 1
    print(input_s)
    print(input_e)
    print(input_w)
    #input_x = np.random.uniform(-100,100,[8,2048]).astype(np.float16)
    #golden =(input_x/ (np.exp(-1.59576912*(0.044715*input_x**3+ input_x)) + 1)).astype(np.float16)

    golden = torch.lerp(input_s,input_e,input_w)
    input_s_array = input_s.numpy()
    input_e_array = input_e.numpy()
    input_w_array = input_w.numpy()
    golden_array = golden.numpy()
    input_s_array.tofile("./input/input_s.bin")
    input_e_array.tofile("./input/input_e.bin")
    input_w_array.tofile("./input/input_w.bin")
    golden_array.tofile("./output/golden.bin")

if __name__ == "__main__":
    gen_golden_data_simple()
